]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Allow closing immediately
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 20 Feb 2021 11:35:06 +0000 (12:35 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 13 Mar 2021 18:28:15 +0000 (18:28 +0000)
Just like opening the OSK, make it possible to close it immediately,
we'll make use of this in the next commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1760>

js/ui/keyboard.js

index 023b0484f432703e4d10ef0c48432f022ee833bc..22ebb32659382951879986c7b3e2bacbcf57f262 100644 (file)
@@ -1798,7 +1798,7 @@ var Keyboard = GObject.registerClass({
         this._setEmojiActive(false);
     }
 
-    close() {
+    close(immediate = false) {
         this._clearShowIdle();
         this._keyboardRequested = false;
 
@@ -1806,6 +1806,12 @@ var Keyboard = GObject.registerClass({
             return;
 
         this._clearKeyboardRestTimer();
+
+        if (immediate) {
+            this._close();
+            return;
+        }
+
         this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
             KEYBOARD_REST_TIME,
             () => {